import Vue from 'vue'
import Router from 'vue-router'
import loginView from '@/views/login.vue'

import leaveApp from '@/views/yuangong/leaveApp.vue'
import reimburseApp from '@/views/yuangong/reimburseApp.vue'
import leaveExam from '@/views/renshi/leaveExamine.vue'
import positionApp from '@/views/yuangong/positionApp.vue'
import materialApp from '@/views/yuangong/materialApp.vue'

import yindexView from '@/views/yuangong/yindex'
import updateuserView from '@/views/updateUser.vue'
import updatepassView from '@/views/updatepass.vue'
import laoindexView from '@/views/laoban/laoindex.vue'
import lindexView from '@/views/lingdao/lindex.vue'
import rindexView from '@/views/renshi/rindex.vue'
import dakaViews from '@/views/yuangong/daka'





Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      component: loginView
    },

    
    
    
    
      

    // 员工界面的
    {
      path:'/yindex',
      component:yindexView,
      children:[
        {
          path : '/updateuser',
          component:updateuserView 
        },
        {
          path:'/updatepass',
          component:updatepassView
        },
        {
          path:'/daka',
          component:dakaViews
        },{
          path:'/leaveapp',
          component: leaveApp
        },{
          path:'/reimburseapp',
          component: reimburseApp
        },{
          path:'/positionapp',
          component: positionApp
        },{
          path:'/materialapp',
          component: materialApp
        }
        

      ]
    },
    //人事
    {
      path:'/rindex',
      component:rindexView,
      children:[
        {
          path : '/updateuser',
          component:updateuserView 
        },
        {
          path:'/updatepass',
          component:updatepassView
        },{
          path:'/leaveapp',
          component: leaveApp
        },{
          path:'/reimburseapp',
          component: reimburseApp
        },{
          path:'/positionapp',
          component: positionApp
        },{
          path:'/materialapp',
          component: materialApp
        }
        

      ]
    },
    //领导界面
    {
      path:'/lindex',
      component:lindexView,
      children:[
        {
          path : '/updateuser',
          component:updateuserView 
        },
        {
          path:'/updatepass',
          component:updatepassView
        },{
          path:'/leaveapp',
          component: leaveApp
        },{
          path:'/leaveexam',
          component: leaveExam
        },{
          path:'/reimburseapp',
          component: reimburseApp
        },{
          path:'/positionapp',
          component: positionApp
        },{
          path:'/materialapp',
          component: materialApp
        } 
      ]
    },
    //老板
    {
      path:'/laoindex',
      component:laoindexView,
      children:[
        {
          path : '/updateuser',
          component:updateuserView 
        },
        {
          path:'/updatepass',
          component:updatepassView
        },{
          path:'/leaveexam',
          component: leaveExam
        }
        

      ]

    }
  
   
  ]
})
